import { post } from "../service";


export interface CreateReq {
    name: string;
}

export interface CreateRes {
    id: number,
    name: string,
}

export const create = async (req: CreateReq) => {
    return await post('/api/dev_type/create', req) as CreateRes;
}

export interface DeleteReq {
    id: number,
}

export const delete2 = async (req: DeleteReq) => {
    await post('/api/dev_type/delete', req);
}

export interface DevType {
    id: number,
    name: string,
}

export const query = async () => {
    return await post('/api/dev_type/query', {}) as DevType[];
}

